import request from '@/utils/request'
//添加科目
export const addSubject = (data) => {
    return request.post('/exam/T_subject/add', data);
};

//查询全部科目
export const getTotalSubject = () => {
    return request.get('/exam/T_subject/list')
}
//通过id来删除科目信息
export const deleteSubjectInfo = (id) => {
    return request.delete(`/exam/T_subject/delete/${id}`)
}

//更新科目
export const updateSubject = (data) => {
    return request.put(`/exam/T_subject/update?id=${data.id}&subject=${data.subject}`)
}

//根据id获取科目
export const getIdSubject = (id) => {
    return request.get(`/exam/T_subject/info/${id}`)
}

// 根据学院id获取科目
export const getSubCollegeId = (id) => {
    return request.get(`/exam/T_own/getSubjectsByAcademy/${id}`, id)
}

//添加科目（最新，与教学大纲相关）
export const addCourseSubject = (data) => {
    return request.post('/exam/T_subject/add/addClass',data)
}

//删除科目（最新，与教学大纲相关）
export const deleteCourseSubject = (id) => {
    return request.delete(`/exam/T_subject/deleteRecord?t_user_and_a_c_s_id=${id}`,id)
}

//更新科目（最新，与教学大纲相关）
export const putCourseSubject = (data) => {
    return request.put('/exam/T_subject/updateClassDescription', data)
}
